export const userStatus = (state,username) => {

    if(username){
        sessionStorage.setItem("username",username);
        state.isLogin = true
    }else {
        state.isLogin = false;
        state.currentUsername = null;
    }
}

export const userIdStatus = (state,userId) => {

    if(userId){
        sessionStorage.setItem("userId",userId);
        state.isLogin = true
    }else {
        state.isLogin = false;
        state.currentUserId = null;
    }
}
